package nkr1pt.popkorn.interact;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import nkr1pt.popkorn.download.DownloadCandidate;
import nkr1pt.popkorn.schedule.SchedulerMode;

/**
 * Holds information about the status of Popkorn.
 *
 * @author Kristof Vanhaeren
 */
public class PopkornStatus {

    private SchedulerMode schedulerMode;

    private int totalDownloads;

    private Set<DownloadCandidate> completedDownloads = new HashSet<DownloadCandidate>();

    private Set<DownloadCandidate> failedDownloads = new HashSet<DownloadCandidate>();

    // map of active downloads and their procentual completion
    private Map<DownloadCandidate, Integer> busyDownloads = new HashMap<DownloadCandidate, Integer>();

    private Set<DownloadCandidate> waitingDownloads = new HashSet<DownloadCandidate>();

    private Set<DownloadCandidate> extractingDownloads = new HashSet<DownloadCandidate>();

    private Set<DownloadCandidate> extractedDownloads = new HashSet<DownloadCandidate>();

    public SchedulerMode getSchedulerMode() {
        return schedulerMode;
    }

    public void setSchedulerMode(SchedulerMode schedulerMode) {
        this.schedulerMode = schedulerMode;
    }

    public int getTotalDownloads() {
        return totalDownloads;
    }

    public void setTotalDownloads(int totalDownloads) {
        this.totalDownloads = totalDownloads;
    }

    public Set<DownloadCandidate> getCompletedDownloads() {
        return completedDownloads;
    }

    public void setCompletedDownloads(Set<DownloadCandidate> completedDownloads) {
        this.completedDownloads = completedDownloads;
    }

    public Set<DownloadCandidate> getFailedDownloads() {
        return failedDownloads;
    }

    public void setFailedDownloads(Set<DownloadCandidate> failedDownloads) {
        this.failedDownloads = failedDownloads;
    }

    public Map<DownloadCandidate, Integer> getBusyDownloads() {
        return busyDownloads;
    }

    public void setBusyDownloads(Map<DownloadCandidate, Integer> busyDownloads) {
        this.busyDownloads = busyDownloads;
    }
    
    public Set<DownloadCandidate> getWaitingDownloads() {
        return waitingDownloads;
    }

    public void setWaitingDownloads(Set<DownloadCandidate> waitingDownloads) {
        this.waitingDownloads = waitingDownloads;
    }

    public Set<DownloadCandidate> getExtractedDownloads() {
        return extractedDownloads;
    }

    public void setExtractedDownloads(Set<DownloadCandidate> extractedDownloads) {
        this.extractedDownloads = extractedDownloads;
    }

    public Set<DownloadCandidate> getExtractingDownloads() {
        return extractingDownloads;
    }

    public void setExtractingDownloads(Set<DownloadCandidate> extractingDownloads) {
        this.extractingDownloads = extractingDownloads;
    }

}